<!-- 帖子 -->
<template>
  <view>
    <view class="flex-b l-h-80" style="height: 80rpx;border-bottom: 1px solid #ccc;">
      <uni-icons type="arrow-up" size="20"></uni-icons>
      <view class="f-s-16 f-w">{{post.title | update}}</view>
      <view class="post-text f-s-16 f-w">{{post.text}}</view>
    </view>
  </view>
</template>

<script>
  export default {
    name: "my-post",
    props: {
      post: {
        type: Object,
        default: {}
      }
    },
    data() {
      return {};
    },
    filters: {
      update(str) {
        return '[' + str + ']'
      }
    }
  }
</script>

<style lang="scss">
  .post-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 540rpx
  }
</style>